import Vue from 'vue'
import App from './App.vue'
import store from './core/store/register'
import './assets/style/global.less'
import 'ant-design-vue/dist/antd.css'
import 'normalize.css'

import AntDesignVue from "ant-design-vue";
import router from "@/core/router/router";
import VueStorage from 'vue-ls'
import {defaultSetting} from "@/core/setting/DefaultSetting";
import Device from "@/core/mixin/Device";
import MainLayout from "@/core/layouts/MainLayout.vue";

Vue.use(VueStorage, defaultSetting.storageOptions);

Vue.use(AntDesignVue);

Vue.config.productionTip = false;

const menus = [
    {
        path: '/system',
        name: 'system',
        redirect: '/system/UserList',
        component: MainLayout,
        meta: {title: '系统管理', keepAlive: true, icon: "table"},
        children: [
            {
                path: '/system/UserList',
                name: 'UserList',
                meta: {title: '用户管理', keepAlive: true}
            }, {
                path: '/system/DictList',
                name: 'DictList',
                meta: {title: '字典管理', keepAlive: true}
            }
        ]
    },
];


const themeColor = require('./core/setting/ThemeColor');
const initializer = () => {
    ////console.log(`Initializer: 初始化................`);
    Vue.ls.set('menus', menus);
    ////console.log(`navTheme---> `, SettingsModule.navTheme);
    ////console.log(`layout---> `, SettingsModule.layout);
    ////console.log(`contentWidth---> `, SettingsModule.contentWidth);
    ////console.log(`fixedHeader---> `, SettingsModule.fixedHeader);
    ////console.log(`fixSiderbar---> `, SettingsModule.fixSiderbar);
    ////console.log(`autoHideHeader---> `, SettingsModule.autoHideHeader);
    ////console.log(`colorWeak---> `, SettingsModule.colorWeak);
    ////console.log(`multiTab---> `, SettingsModule.multiTab);
    ////console.log(`production---> `, SettingsModule.production);
    ////console.log(`device---> `, SettingsModule.device);
    ////console.log(`sidebar---> `, SettingsModule.sidebar);

    themeColor.changeColor(defaultSetting.primaryColor);
};


new Vue({
    mixins: [Device],
    router,
    store,
    created: initializer,
    render: h => h(App)
}).$mount('#app');
